(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
times(x, plus(y, s(z))) → plus(times(x, plus(y, times(s(z), 0))), times(x, s(z)))
times(x, 0) → 0
times(x, s(y)) → plus(times(x, y), x)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(z0, plus(z1, s(z2))) → plus(times(z0, plus(z1, times(s(z2), 0))), times(z0, s(z2)))
times(z0, 0) → 0
times(z0, s(z1)) → plus(times(z0, z1), z0)
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
Tuples:
TIMES(z0, plus(z1, s(z2))) → c(PLUS(times(z0, plus(z1, times(s(z2), 0))), times(z0, s(z2))), TIMES(z0, plus(z1, times(s(z2), 0))), PLUS(z1, times(s(z2), 0)), TIMES(s(z2), 0), TIMES(z0, s(z2)))
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
S tuples:
TIMES(z0, plus(z1, s(z2))) → c(PLUS(times(z0, plus(z1, times(s(z2), 0))), times(z0, s(z2))), TIMES(z0, plus(z1, times(s(z2), 0))), PLUS(z1, times(s(z2), 0)), TIMES(s(z2), 0), TIMES(z0, s(z2)))
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
K tuples:none
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
TIMES, PLUS
Compound Symbols:
c, c2, c4
(3) CdtUnreachableProof (EQUIVALENT transformation)
The following tuples could be removed as they are not reachable from basic start terms:
TIMES(z0, plus(z1, s(z2))) → c(PLUS(times(z0, plus(z1, times(s(z2), 0))), times(z0, s(z2))), TIMES(z0, plus(z1, times(s(z2), 0))), PLUS(z1, times(s(z2), 0)), TIMES(s(z2), 0), TIMES(z0, s(z2)))
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(z0, plus(z1, s(z2))) → plus(times(z0, plus(z1, times(s(z2), 0))), times(z0, s(z2)))
times(z0, 0) → 0
times(z0, s(z1)) → plus(times(z0, z1), z0)
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
Tuples:
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
S tuples:
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
K tuples:none
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
TIMES, PLUS
Compound Symbols:
c2, c4
(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
We considered the (Usable) Rules:
times(z0, 0) → 0
times(z0, s(z1)) → plus(times(z0, z1), z0)
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
And the Tuples:
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = [3]
POL(PLUS(x1, x2)) = 0
POL(TIMES(x1, x2)) = [2]x2
POL(c2(x1, x2)) = x1 + x2
POL(c4(x1)) = x1
POL(plus(x1, x2)) = 0
POL(s(x1)) = [1] + x1
POL(times(x1, x2)) = [4] + [2]x1 + [2]x2
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(z0, plus(z1, s(z2))) → plus(times(z0, plus(z1, times(s(z2), 0))), times(z0, s(z2)))
times(z0, 0) → 0
times(z0, s(z1)) → plus(times(z0, z1), z0)
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
Tuples:
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
S tuples:
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
K tuples:
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
TIMES, PLUS
Compound Symbols:
c2, c4
(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
We considered the (Usable) Rules:
times(z0, 0) → 0
times(z0, s(z1)) → plus(times(z0, z1), z0)
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
And the Tuples:
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(PLUS(x1, x2)) = x2
POL(TIMES(x1, x2)) = [2]x1·x2
POL(c2(x1, x2)) = x1 + x2
POL(c4(x1)) = x1
POL(plus(x1, x2)) = 0
POL(s(x1)) = [1] + x1
POL(times(x1, x2)) = 0
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(z0, plus(z1, s(z2))) → plus(times(z0, plus(z1, times(s(z2), 0))), times(z0, s(z2)))
times(z0, 0) → 0
times(z0, s(z1)) → plus(times(z0, z1), z0)
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
Tuples:
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
S tuples:none
K tuples:
TIMES(z0, s(z1)) → c2(PLUS(times(z0, z1), z0), TIMES(z0, z1))
PLUS(z0, s(z1)) → c4(PLUS(z0, z1))
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
TIMES, PLUS
Compound Symbols:
c2, c4
(9) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(10) BOUNDS(O(1), O(1))